package com.itheima.mapper;

import com.itheima.pojo.Permission;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PermissionMapper {
    //分页查询权限列表数据
    List<Permission> findByCondition(@Param("queryString")String queryString, @Param("name")String name);
    //查询权限列表
    List<Permission> findAllPermission();
    //通过用户名查询权限id
    List<Integer> findPermissionIdsByRoleName(@Param("name") String name);
    //添加/修改权限
    void edit(@Param("name") String name, @Param("permissionIds") Integer[] permissionIds);
    //删除权限
    void delete(String name);
    //根据id删除权限
    void deleteById(@Param("id") Integer id, @Param("name") String name);
}
